package com.lanzuo.yxd.scanner.controller;

import com.lanzuo.yxd.scanner.service.TouchScannerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/scanner")
public class MessageController {

    @Resource
    TouchScannerService touchScannerService;

    @PostMapping("/trigger-scan")
    public String sendT1() {
        // 先扫上面的码
        touchScannerService.scan();
        return "T1 已发送";
    }
}